import request from '@/utils/request'
//获取部门
export function getDepartment() {
  return request({
    url: '/company/department',
  })
}
//获取部门负责人
export function getDepartmentmanager() {
  return request({
    url: '/sys/user/simple'
  })
}
//新增部门
export function addepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

//获取负责人
export function addmanagerList() {
  return request({
    url: '/sys/user/simple'
  })


}
//获取部门详情

export function getdepartmentdetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}



//修改部门详情

export function updatadepartmentdetail(data) {
  return request({
    url: `company/department/${data.id}`,
    method: 'put',
    data
  })
}
//删除部门详情
export function delDepartmentDetail(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
